package com.project.mapper;

import com.project.bean.UserBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface IUserMapper {
    @Select("select * from t_user where u_name=#{name} and u_pwd=#{pwd}")
    @ResultMap("userMap")
    public UserBean login(@Param("name") String userName, @Param("pwd") String pwd);

    @Select("INSERT INTO t_user(pk_id,u_name,u_pwd,u_grade,u_birthday)VALUES(#{id}#{name},#{pwd},#{grade},#{birthday})")
    public void add(UserBean userBean);
}
